package guo.bean;

import guo.validation.idpg.InsertValidation;
import guo.validation.idpg.PutValidation;
import guo.validation.selfValidation.ListValue;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

public class SelfBean {

    @ListValue(vals={1,0},groups = {InsertValidation.class})
    private int sex;

    @NotBlank
    private String name;

    @NotNull(groups = {PutValidation.class})
    private int id;


    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "SelfBean{" +
                "sex=" + sex +
                ", name='" + name + '\'' +
                ", id=" + id +
                '}';
    }
}
